<template>
    <van-nav-bar title="详情" />

    <van-tabs v-model:active="active">
        <van-tab title="主页">
            <img src="../../../assets/详情页.png" alt="" style="width: 100%;
            height: 100%;">
            <!-- <van-swipe :autoplay="3000" lazy-render>
                <van-swipe-item v-for="(v, i) in list" :key="i">
                    <img :src="v.pics_sma_url ? pics_sma_url : 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg'"
                        style="width: 100%;" />
                    <div>{{ v.goods_name }}</div>
                    <div>{{ v.price }}</div>
                </van-swipe-item>
            </van-swipe> -->
        </van-tab>
        <van-tab title="详情">内容 2</van-tab>
        <van-tab title="评价">内容 3</van-tab>
    </van-tabs>
</template>

<script setup>
import { ref } from 'vue'
import { detailApi, swiperdataApi } from '@/api/api'
import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()
let goods_id = ref(route.query.goods_id)

let list = ref({})

const detail = () => {
    detailApi(goods_id.value).then(res => {
        list.value = res.data.message.pics
    })
}
detail()

// let list1 = ref([])
// const swiperdata = () => {
//     swiperdataApi().then(res => {
//         list1.value = res.data.message
//     })
// }
// swiperdata()
</script>

<style lang="scss" scoped></style>